<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = [54,89,65,76,87,43,56,79,98,87];
        var sum = 0;
        for(var i = 0;i < arr.length;i++){
            sum += arr[i];
        }
        var average = sum / arr.length;
        var count = 0;
        for(var i=0;i < arr.length;i++){
            if(arr[i] >= average){
                count++;
            }
        }
        console.log("大于等于平均成绩"+average+"的人数有"+count);
    </script>
</head>
<body>
    
</body>
</html>